@extends('admin.base')
    @section('content')
        <!-- Content Header (Page header) -->
        <section class="content-header">
          <h1>
            <i class="fa fa-calendar"></i>
			主页商品类别信息管理
          </h1>
          <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li>
            <li><a href="#">主页商品类别信息管理</a></li>
          </ol>
        </section>
        <!-- Main content -->

		<section class="content">
          <div class="row">
            <!-- right column -->
            <div class="col-md-12">
              <!-- Horizontal Form -->
              <div class="box box-primary">
                <div class="box-header with-border">
                </div><!-- /.box-header -->
                <!-- form start -->
                <form action="{{url('admin/type')}}/{{$data->id}}" method="post" class="form-horizontal" enctype="multipart/form-data">
                  <input type="hidden" name="_token" value="<?php echo csrf_token(); ?>">
				  <input type="hidden" name="_method" value="PUT">
                  <div class="box-body">
                    <div class="form-group">
                      <label for="inputEmail3" class="col-sm-2 control-label">类别ID：</label>
                      <div class="col-sm-4">
                        <input type="text" name="id" class="form-control" readonly value="{{$data->id}}">
                      </div>
                    </div>
					<div class="form-group">
                      <label for="inputEmail3" class="col-sm-2 control-label">类别名称：</label>
                      <div class="col-sm-4">
                        <input type="text" name="name" class="form-control" value="{{$data->name}}">
                      </div>
                    </div>
					<div class="form-group">
                      <label for="inputEmail3" class="col-sm-2 control-label">父类别名称：</label>
                      <div class="col-sm-4">
						<select name="pid">
							<option value="0">根类别</option>
								@foreach($list as $v)
									<option value="{{$v['id']}}">{{$v['name']}}</option>
								@endforeach
						</select>		
                      </div>
                    </div>
					<div class="form-group">
                      <label for="inputEmail3" class="col-sm-2 control-label">父类别ID：</label>
                      <div class="col-sm-4">
                        <input type="text" name="pid" class="form-control" value="{{$data->pid}}">
                      </div>
                    </div>
					<div class="form-group">
                      <label for="inputEmail3" class="col-sm-2 control-label">状态：</label>
                      <div class="col-sm-4">
                        <input type="text" name="status" class="form-control" value="{{$data->status}}">
                      </div>
                    </div>
					<!-- /.box-body -->
                  <div class="box-footer">
				    <div class="col-sm-offset-2 col-sm-1">
						<button type="submit" class="btn btn-primary">修改</button>
                    </div>
					<div class="col-sm-1">
						<button type="submit" class="btn btn-primary">重置</button>
					</div>
                  </div><!-- /.box-footer -->
                </form>
				<div class="row"><div class="col-sm-12">&nbsp;</div></div>
              </div><!-- /.box -->
            </div><!--/.col (right) -->
          </div>   <!-- /.row -->
        </section><!-- /.content -->
    @endsection